from mydb.mysqldb import SQL
from pyspider.result import ResultWorker

class MyResultWorker(ResultWorker):
    def on_result(self, task, result):
        # assert task['taskid']
        # assert task['project']
        # assert task['url']
        # assert result
        sql = SQL()
        sql.replace('post',**result)